package com.augurit.wf.common.dao;

import java.util.ArrayList;
import java.util.List;

import org.springframework.stereotype.Repository;

import com.augurit.common.base.dao.BaseDao;
import com.augurit.wf.common.entity.WfTemplateAttachmentRef;

@Repository
public class WfTemplateAttachmentRefDao extends BaseDao<WfTemplateAttachmentRef, Long> {
	public WfTemplateAttachmentRef getBy(Long templateId, String busFormPrintCode){
		String hql = " select ref from WfTemplateAttachmentRef ref where ref.templateId = ? and ref.fileCode = ?";
		List<Object> values = new ArrayList<Object>();
		values.add(templateId);
		values.add(busFormPrintCode);
		return (WfTemplateAttachmentRef)this.findUnique(hql, values);
	}
}
